package com.boot.dog.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.boot.dog.common.util.ApiResult;
import com.boot.dog.entities.ao.UserAo;
import com.boot.dog.entities.dto.UserAreaDto;
import com.boot.dog.entities.pojo.User;
import com.boot.dog.entities.vo.UserVo;

import java.util.List;

/**
 * @Author: MaxLv
 * @Date: 2020/1/9
 */
public interface UserService {

    ApiResult<Void> saveUser(User user, List<Integer> roleIds);

    ApiResult<Void> editUser(User user, List<Integer> roleIds);

    ApiResult<IPage<UserVo>> getUsers(Page page, UserAo ao);

    ApiResult<Void> delById(Integer id);

    User findByUsername(String username);

    User findUserByUsername(String username);

    ApiResult<Void> modifyPass(String oldPassword, String newPassword);

    ApiResult<Void> enableOrDisableUser(User user);

    ApiResult<Void> editUserArea(UserAreaDto dto);

    List<User> getUserList(UserAo ao);
}
